/*
 * cilindro.h
 *
 *  Created on: 17/02/2013
 *      Author: alex
 */

#ifndef CILINDRO_H_
#define CILINDRO_H_

#include "RayTracer.h"

// Datos específicos de un Cilindro
typedef struct {
	long double X0, Y0, Z0;
	long double Xq, Yq, Zq;
	long double R, R2;
	long double Back, Front;
	long double A,B,C; //Variables precalculadas para la intersección
    long double Gx, Gy, Gz;
	long double Pa, Pb, Pc, Pd;
} cilindro_t;


long double IntCilindro(long double Xe, long double Ye, long double Ze,
                        long double Xd, long double Yd, long double Zd,
                        long double X0, long double Y0, long double Z0,
                        long double Xq, long double Yq, long double Zq,
                        long double A, long double B, long double C,
                        long double Back, long double Front, long double R2,
                        objeto_t *objeto);

long double* NormalCilindro(long double Xi, long double Yi, long double Zi,
						    long double X0, long double Y0, long double Z0,
						    long double Xq, long double Yq, long double Zq,
						 	long double R);

#endif /* CILINDRO_H_ */
